home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / barrel.arc / BARREL.DOC next >
Text File  |  1987-01-21  |  5KB  |  87 lines

  1.  
  2. BARREL:  The Versatile RAM Buffer and Printer Spooler.
  3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.  
  5. by  Moshe Braner       <braner@amvax.tn.cornell.edu>
  6.  
  7.  
  8. Consider the following situations:
  9.  
  10. You want to print long files without holding your computer up in the
  11. meanwhile...
  12.  
  13. You would like to save the screen as a disk file when you press Alt-Help,
  14. instead of printing a hardcopy...
  15.  
  16. You're trying to do some fancy printout, but your word processor doesn't
  17. print what you think you told it to.  You would like to be able to see
  18. exactly what control characters were sent to the printer...
  19.  
  20. You want to print on a remote printer, send a document e-mail, or input it
  21. to another program, but your word processor (or whatever) will only save
  22. documents in its own wierd format, not as a formatted ASCII file...
  23.  
  24. You have a printer-driver to print graphics from program X on printer A.
  25. But you would like to use printer B.  You have the documentation for both
  26. printers.  You could easily write a "post-processor" program that will
  27. replace one set of control chars with another.  But first you need a
  28. method of capturing the output for printer A in a file...
  29.  
  30. It is all possible with the program "BARREL".
  31.  
  32. When you run BARREL for the first time in a session (from the desktop or
  33. from the auto folder) it installs a RAM buffer plus some resident code.
  34. You enter the desired size of the buffer in units of 12K: a number between
  35. 1 and 9.  (You need to press '3' (i.e. a 36K buffer) or more if you want
  36. to capture DEGAS format screen dumps.) Then, and every time you run the
  37. (same) program later in the session, you get to choose items from a menu:
  38.  
  39.     Capture printouts in barrel
  40.     Immediate hardcopy printouts
  41.     Empty barrel                         - make room for new stuff
  42.     Write barrel to a disk file          - file the RAM buffer
  43.     Read a file into barrel              - for background printing
  44.     Hardcopy screen dumps
  45.     SCODE format screen dumps
  46.     DEGAS format screen dumps
  47.     Background printing                  - after Capture or Reading
  48.     Foreground printing only             - but can resume later
  49.     Quit                                 - but leave settings intact
  50.  
  51. BARREL intercepts all BIOS calls, and when they concern the printer it
  52. redirects them to a RAM buffer.  BARREL achieves background printing by
  53. installing a routine in the 200 Hz system timer interrupt (that's plenty
  54. fast enough for text but rather slow when printing graphics).  You can
  55. also ask BARREL to read a file into the RAM buffer.  That is a faster way
  56. of setting a file up for background printing.  The barrel is automatically
  57. emptied whenever background printing catches up with the saved stuff.  It
  58. is NOT emptied upon writing to a file, so if you want to do both you
  59. should write the file first.
  60.  
  61. BARREL also redirects the screen dump vector, enabling capture of the
  62. screen dump in RAM, in either SCODE or DEGAS format.  A "screen dump" is
  63. caused by either pressing Alt-Help, or by a program (e.g. N-Vision)
  64. calling the XBIOS screen- dump function.  If the screen dump is successful
  65. (i.e. there was enough space available in the barrel) the screen will
  66. 'blink' as a confirmation.  The captured data may then be saved to disk by
  67. re-running BARREL and pressing 'W'.  SCODE is a format that is both
  68. compressed and coded as text, so it is ideal for sending pictures via
  69. electronic mail (no uuencoding necessary).  You must use the SDECODE
  70. program to view the picture, print it, or save it in a standard bit-map
  71. form.  Note that when using DEGAS format dumps in BARREL, repeated
  72. Alt-Helps overwrite each other, only the last saved screen is still there.
  73. When using SCODE format dumps, they accumulate in the barrel as long
  74. as there is enough space.  Individual dumps are separated by a blank
  75. line.  After you write the barrel to disk you must use a text editor
  76. to separate the dumps (and remove any other text preceding coded dumps).
  77. Also note that the format of the saved graphics is NOT printable, while
  78. the normal screen dump does not go through any BIOS calls.  Therefore, you
  79. cannot print an Alt-Help screen dump in the background without some extra
  80. software.  You CAN spool the output of a program that prints graphics from
  81. a file (e.g.  a GEM metafile) as long as the program calls the BIOS
  82. Bconout() function to print each byte.
  83.  
  84. Asking for "immediate hardcopy printouts" just turns off interception of
  85. printer output.  If you want to actually remove BARREL and reclaim the
  86. memory it holds, you have to reboot.
  87.